/**
 * Copyright (c) Css Team
 * All rights reserved.
 *
 * This file GetFuncTree.java creation date: [Jan 9, 2014 9:55:46 AM] by Xingzhc
 * http://www.css.com.cn
 */

package com.css.apps.base.func.action;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.css.core.configuration.Environment;
import com.css.util.Ajax;
import com.css.util.Messages;
import com.css.webbase.webwork.action.AdminAction;
import com.opensymphony.xwork.Action;

/**
 * <p>
 * 获得树
 * </p>
 * 
 */
@SuppressWarnings("serial")
public class GetFuncTree extends AdminAction {
	
	private static Log log = LogFactory.getLog(GetFuncTree.class);
	private String id;
	private String funcId;

	@Override
	protected String adminGo() {
		try {
			result = FuncItem.getSubFuncMenu(id, funcId).toString().toString();
			return Action.SUCCESS;
		} catch (Exception ex) {
			result = Ajax.JSONResult(Environment.RESULT_CODE_ERROR, Messages.getString("systemMsg.exception"));
			log.error(ex.getMessage(), ex);
			return Action.ERROR;
		}
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getFuncId() {
		return funcId;
	}

	public void setFuncId(String funcId) {
		this.funcId = funcId;
	}

}
